package cn.fintecher.gis.respository;

import cn.fintecher.gis.entity.QUploadFile;
import cn.fintecher.gis.entity.UploadFile;
import com.querydsl.core.types.dsl.StringPath;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.data.querydsl.binding.QuerydslBinderCustomizer;
import org.springframework.data.querydsl.binding.QuerydslBindings;

public interface UploadFileRepository extends QuerydslPredicateExecutor<UploadFile>, JpaRepository<UploadFile, String>, QuerydslBinderCustomizer<QUploadFile> {
    @Override
    default void customize(final QuerydslBindings bindings, final QUploadFile root) {
        bindings.bind(String.class).first((StringPath path, String value) -> path.contains(value));
    }
}
